﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    protected void menuTabs_MenuItemClick(object sender, MenuEventArgs e)
    {
        multiTabs.ActiveViewIndex = Int32.Parse(menuTabs.SelectedValue);
 
    }

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
 <script type="text/javascript">
        
        function displayCalendar()
        {
            var datePicker = document.getElementById('datePicker');
            datePicker.style.display = 'block';
        }
    
    </script>
<script type="text/javascript">


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}



</script>
 <style type="text/css">
        #datePicker
        {
            display:none;
            position:absolute;
            border:solid 2px black;
            background-color:white;
           
        }
    
    </style>
<style type="text/css">
html
{
  background-image:url('image/back.jpg'); 

    padding:10px;
    color:White;    
  
}
.content
{
    width:950px;
    margin:auto;
        height: 197px;
    }
a
{
 color: white;
 text-decoration:none;

}
a:hover
{
 color: red; 
  text-decoration:none;

}
.link
{
  margin-left:350px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.link2
{
  margin-left:50px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.link3
{
  margin-left:300px; 
     font-weight:bold;

}
.join
{
   background-color:#0099FF;
  clip:auto;
  font-weight:bold;
  font-size:large;
}
.table2
{
 border-style:solid;
   border-color:Black;
   background-color:White;
   color:Black;  
   width:900px; 
}
.row
{
   background-color:Gray;
   color:White;
}

.ticket
{
   background-color:#CC0000;
color:White;

}

.ticket:hover
{
 color: black; 
  text-decoration:none;
}

 .style1
 {
        width: 509px;
  }
    
.footer
{

   margin-top:250px;
}
.movielist
{
    background-color:White;
    color:Black;
}
.moviestatus
{
 background-color:black;
  color:#CCFFFF;
 font-size:x-large;
  font-weight:bold;
    
}  
.movietitle
{
    color:Black;
}
.movietitle:a
{
    color:Black;
}

.movietitle:hover
{
    text-decoration:none;
    color:Black;
     
}
.moviemenu
{
    background-color:White;
      position:relative;
}

</style>
 <style type="text/css">
    .movies td
    {
        padding:10px;
        text-align:right;
    }
 </style>
  <style type="text/css">
 .menucinema
 {
     color:Black;
     background-color:Blue;
 }
        .tab
        {
            color:Black;
  
   border-right:Solid 1px white;
            padding:0px 50px;
     
        }
        .selectedTab
        {
            color:White;
         border-left:Solid 1px white;
            padding:0px 50px;
            background-color:black;
        }

    </style>
    <title>Movie Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="content">
  <asp:Image ID="Image1" Width="1000" Height="130" ImageUrl="~/image/tdk-jun5-bannerbatmanexclusivo2.jpg" runat="server" /><br />

<asp:HyperLink ID="HyperLink14"  CssClass="link" NavigateUrl="~/Default.aspx" runat="server">Home</asp:HyperLink>
<asp:HyperLink ID="HyperLink1"  CssClass="link2" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink> <asp:HyperLink ID="HyperLink2" CssClass="link2" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink>
<asp:HyperLink ID="HyperLink3" CssClass="link2"  NavigateUrl="~/Price.aspx" runat="server">Prices</asp:HyperLink>
<asp:HyperLink ID="HyperLink6" CssClass="link2"  NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink>
 <br /> <br />
      
  

   <br />
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label><asp:Label ID="Label5" runat="server" Text="UserName:" CssClass="link3" ></asp:Label>  <asp:LoginName ID="LoginName1" runat="server" /> &nbsp;&nbsp;&nbsp<asp:HyperLink ID="HyperLink15" NavigateUrl="~/myaccount.aspx" Font-Bold="True" Font-Underline="True" runat="server"  ForeColor="Yellow" />&nbsp;&nbsp;&nbsp
    <asp:LoginStatus ID="LoginStatus1" runat="server" /><br/><br/>
<div class="moviemenu">
   <asp:Menu
        id="menuTabs"
       DynamicHorizontalOffset="80"   
      DynamicHoverStyle-BackColor="#666666"
        DynamicMenuItemStyle-Width="150px"
       DynamicMenuItemStyle-BackColor="#333333"
        StaticMenuItemStyle-CssClass="tab"
        StaticSelectedStyle-CssClass="selectedTab"
           OnMenuItemClick="menuTabs_MenuItemClick"
        Orientation="Horizontal"

        Runat="server">
<StaticSelectedStyle CssClass="selectedTab"></StaticSelectedStyle>

<StaticMenuItemStyle CssClass="tab"></StaticMenuItemStyle>

<DynamicHoverStyle BackColor="#666666"></DynamicHoverStyle>

       <DynamicItemTemplate>
           <%# Eval("Text") %>
       </DynamicItemTemplate>

<DynamicMenuItemStyle BackColor="#333333" Width="150px" Font-Bold="True" Font-Size="Large"></DynamicMenuItemStyle>
        <Items>
        <asp:MenuItem
            Text="All movies" 
            Value="0" />
        <asp:MenuItem
            Text="Coming Soon" 
            Value="1"/>
     
        
  <asp:MenuItem
       Text="Cinemas" Selectable="False"  >
     <asp:MenuItem
       Text="Southwestcinema4"
   
        NavigateUrl="~/MovieCinema1.aspx" />
    <asp:MenuItem
      Text="RuralTwinCinemas"
     NavigateUrl="~/MovieCinema2.aspx" />
   </asp:MenuItem> 
        </Items>        
       <StaticItemTemplate>
           <%# Eval("Text") %>
       </StaticItemTemplate>
    </asp:Menu>  
   </div>  
   
        <asp:MultiView
        id="multiTabs"
        ActiveViewIndex="0"
        Runat="server">
        <asp:View ID="view1" runat="server">
<asp:Label ID="Label1" runat="server" Text="Now showing" CssClass="moviestatus"></asp:Label>
<div class="movielist">	
 <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" GridLines="Horizontal"  width ="100%" RepeatColumns="2" CssClass="movies">
  <ItemTemplate>
  <table cellpadding="0" cellspacing="0" width ="100%">
  <tr><td>
  
<asp:ImageButton ID="Image1" runat="server" Width="172" Height="250" ImageUrl=  '<%# "Movie/" + Eval("imagefname")%>' PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' /></td><td style="text-align: left" style="vertical-align: text-top"> 
<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True" Font-Size="Larger" CssClass="movietitle" NavigateUrl="~/Movie.aspx" >'<%#Eval("MovieTitle")%>'</asp:HyperLink><br />
 <asp:Label ID="Label2" runat="server" Text='<%#Eval("Rating")%>' ForeColor="Red" ></asp:Label><br />
 <asp:Label ID="Label5" runat="server" Text='<%#Eval("MovieDuration")%>' Font-Bold="True" ForeColor="#0099FF"></asp:Label> <br />
  <asp:Label ID="Label7" runat="server" Text='<%#Eval("TheatreName")%>' Font-Bold="True" ></asp:Label> <br />
 <br />
 <asp:Label ID="description"  Width="250px" runat="server" Text='<%#Eval("MovieDescription")%>' ></asp:Label><br />   <asp:LinkButton ID="LinkButton1" runat="server"       PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' CssClass="ticket"   >[movie info]</asp:LinkButton>&nbsp;&nbsp;&nbsp<asp:HyperLink ID="HyperLink7" NavigateUrl="~/Session.aspx" CssClass="ticket" runat="server">[session & ticket]</asp:HyperLink>   </td></tr><br />
   
      
</table>
  </ItemTemplate>      
     
 </asp:DataList>	
	
</div>	
<asp:Label ID="Label3" runat="server" Text="Coming" CssClass="moviestatus"></asp:Label>	
<div class="movielist">	
 <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2" GridLines="Horizontal" width ="100%" RepeatColumns="2" CssClass="movies">
  <ItemTemplate>
  <table cellpadding="0" cellspacing="0" width ="100%">
  <tr><td>
 <asp:ImageButton ID="Image1" runat="server" Width="172" Height="250" ImageUrl=  '<%# "Movie/" + Eval("imagefname")%>' PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' /></td><td style="text-align: left" style="vertical-align: text-top"> 
<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True" Font-Size="Larger" CssClass="movietitle" NavigateUrl="~/Movie.aspx" ><%#Eval("MovieTitle") %></asp:HyperLink><br />
 <asp:Label ID="Label2" runat="server" Text='<%#Eval("Rating")%>' ForeColor="Red"></asp:Label><br />
 <asp:Label ID="Label5" runat="server" Text='<%#Eval("MovieDuration")%>' Font-Bold="True" ForeColor="#0099FF"></asp:Label> <br />
   <asp:Label ID="Label7" runat="server" Text='<%#Eval("TheatreName")%>' Font-Bold="True" ></asp:Label> <br />
 <br />
 <asp:Label ID="description1"  Width="250px" runat="server" Text='<%#Eval("MovieDescription")%>' ></asp:Label><br />   <asp:LinkButton ID="LinkButton1" runat="server"       PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' CssClass="ticket"   >[movie info]</asp:LinkButton>  &nbsp;&nbsp;&nbsp   </td></tr><br />
  
</table>
  </ItemTemplate>      
     
 </asp:DataList>	
	
</div>	
	
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
  ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    
                SelectCommand="SELECT DISTINCT Movie.MovieTitle, Movie.Rating, Movie.MovieId, Movie.MovieDuration, Movie.MovieDescription, Movie.imagefname, Movie.Showing, Theatre.TheatreName FROM Movie INNER JOIN Theatre ON Movie.TheatreId = Theatre.TheatreId WHERE (Movie.Showing = @Showing)">
   <SelectParameters>
    <asp:Parameter DefaultValue="True" Name="Showing" Type="Boolean" />
 </SelectParameters>
</asp:SqlDataSource>
	
	<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
  ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    
                SelectCommand="SELECT DISTINCT Movie.MovieTitle, Movie.Rating, Movie.MovieId, Movie.MovieDuration, Movie.MovieDescription, Movie.imagefname, Movie.Showing, Theatre.TheatreName FROM Movie INNER JOIN Theatre ON Movie.TheatreId = Theatre.TheatreId WHERE (Movie.Showing = @Showing)">
   <SelectParameters>
    <asp:Parameter DefaultValue="False" Name="Showing" Type="Boolean" />
 </SelectParameters>
</asp:SqlDataSource>
  </asp:View>

    <asp:View ID="view2" runat="server" >
 <asp:Label ID="Label6" runat="server" Text="Coming" CssClass="moviestatus"></asp:Label>       
<div class="movielist">	
 <asp:DataList ID="DataList3" runat="server" DataSourceID="SqlDataSource2" GridLines="Horizontal" width ="100%"  RepeatColumns="2" CssClass="movies">
  <ItemTemplate>
  <table cellpadding="0" cellspacing="0" width ="100%">
  <tr><td>
 <asp:ImageButton ID="Image1" runat="server" Width="172" Height="250" ImageUrl=  '<%# "Movie/" + Eval("imagefname")%>' PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' /></td><td style="text-align: left" style="vertical-align: text-top"> 
<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True" Font-Size="Larger" CssClass="movietitle" NavigateUrl="~/Movie.aspx" ><%#Eval("MovieTitle") %></asp:HyperLink><br />
 <asp:Label ID="Label2" runat="server" Text='<%#Eval("Rating")%>' ForeColor="Red"></asp:Label><br />
 <asp:Label ID="Label5" runat="server" Text='<%#Eval("MovieDuration")%>' Font-Bold="True" ForeColor="#0099FF"></asp:Label> <br />
   <asp:Label ID="Label7" runat="server" Text='<%#Eval("TheatreName")%>' Font-Bold="True" ></asp:Label> <br />
 <br />
   <%#Eval("MovieDescription")%><br />  <asp:LinkButton ID="LinkButton1" runat="server"       PostBackUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>' CssClass="ticket"   >[movie info]</asp:LinkButton>  &nbsp;&nbsp;&nbsp  </td></tr><br />
  
</table>
  </ItemTemplate>      
     
 </asp:DataList>	
	
</div>	
	<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
  ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    SelectCommand="SELECT DISTINCT [MovieTitle], [Rating],[MovieId], [MovieDuration], [MovieDescription], [imagefname], [Showing] FROM [Movie] WHERE ([Showing] = @Showing)">
   <SelectParameters>
    <asp:Parameter DefaultValue="False" Name="Showing" Type="Boolean" />
 </SelectParameters>
</asp:SqlDataSource>
        
</asp:View>
<asp:View ID="view3" runat="server">
        
        Contents of third tab
  </asp:View>
  <asp:View ID="view4" runat="server">
sadasdassa
  </asp:View>
   </asp:MultiView> 

    <table width="100" cellpadding="15" ><tr><td>Copyright@2012 MovieTix</td><td><asp:HyperLink ID="HyperLink8"  CssClass="footer" NavigateUrl="~/Default.aspx" runat="server">Homepage</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink9"  CssClass="footer" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink10"  CssClass="footer" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink12"  CssClass="footer" NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink13"  CssClass="footer" NavigateUrl="~/Login.aspx" runat="server">Log In</asp:HyperLink></td></tr></table>
   </div>
   
    </form>
  
</body>
</html>
